<template>
    <view class="content">
		<view class="txt">
			<view>{{detail.shop.name}}({{detail.name}})</view>
			<view>预约时间:{{detail.order_time}}</view>
		</view>
		<view class="connr">
			<view class="txt1">
				<view>券码</view>
				<view>{{detail.code_number}}</view>
			</view>
			<image :src="imgoss+detail.pic"  mode="aspectFill" class="zrimg"></image>
		</view>
    </view>
</template>

<script>
const app = getApp();
export default {
    data() {
        return {
			imgoss: app.globalData.imgoss,
            id: 0,
			detail:null
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad(options) {
        var that = this;
		this.id = options.id
		this.UserorderDes()
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {},
    methods: {
		UserorderDes(){
			var that = this;
			app.globalData.api.request('User/orderDes', {
				page:this.page,
				id:this.id,
			}, 'post', 'form').then((res) => {
				if (res.code == 0) {
					//console.log(res.data)
					this.detail = res.data
				}else{
					app.globalData.show(res.msg)
				}
			});
		},
	}
};
</script>
<style>
	.zrimg{
		width: 328rpx;
		height: 328rpx;
		display: table;
		margin:60rpx auto;
	}
	.txt1{
		width: 100%;
		height: auto;
		display: flex;
		justify-content: space-between;
		text-align: center;
		line-height: 22px;
		padding: 20rpx 20rpx;
		box-sizing: border-box;
		position: relative;
		border-bottom: 1px dotted #BBBBBB;
	}
	.txt1::before{
		content:'';
		width: 40rpx;
		height: 40rpx;
		background-color: rgba(245,245,245,1);
		border-radius: 40rpx;
		position: absolute;
		bottom: -20rpx;
		left:-40rpx
	}
	.txt1::after{
		content:'';
		width: 40rpx;
		height: 40rpx;
		background-color: rgba(245,245,245,1);
		border-radius: 40rpx;
		position: absolute;
		bottom: -20rpx;
		right:-40rpx
	}
	
	.txt1>view{
		width: auto;
		height: auto;
		display: table;
	}
	.txt1>view:nth-child(1){
		color: rgba(16,16,16,1);
		font-size: 24rpx;
		text-align: left;
		font-family: PingFangSC-bold
	}
	.txt1>view:nth-child(2){
		color: rgba(16,16,16,1);
		font-size: 24rpx;
		text-align: right;
		font-family: PingFangSC-bold
	}
	.connr{
		width: 690rpx;
		height: auto;
		background-color: #fff;
		border-radius: 10rpx;
		box-sizing: border-box;
		padding: 20rpx;
	}
	.txt{
		width: 100%;
		height: auto;
		display: table;
		text-align: center;
		line-height: 22px;
		padding: 20rpx 0px;
	}
	.txt>view{
		width: 100%;
		height: auto;
		display: table;
	}
	.txt>view:nth-child(1){
		color: rgba(16,16,16,1);
		font-size: 34rpx;
		text-align: center;
		font-family: PingFangSC-bold;
	}
	.txt>view:nth-child(2){
		color: rgba(16,16,16,1);
		font-size: 28rpx;
		text-align: center;
		font-family: PingFangSC-regular;
	}
	page{
		background-color: rgba(245,245,245,1);
	}
	.content {
		width: 100%;
		height: auto;
		display: table;
		box-sizing: border-box;
		padding: 20px 24rpx;
		padding-top:10rpx;
	}
</style>
